package com.mysoft.gfyx.demo.controller;

import com.mysoft.framework.modeling.dataapi.DataApi;
import com.mysoft.framework.modeling.dataapi.LoadDataApi;
import com.mysoft.framework.modeling.dto.FieldsSetting;
import com.mysoft.framework.modeling.dto.ListDataResult;
import com.mysoft.framework.modeling.dto.LoadDataParams;
import com.mysoft.framework.mvc.api.Controller;
import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.demo.service.RoomService;
import com.mysoft.gfyx.demo.service.dto.RoomDto;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

@PubService(value = "/roomDataApi", prefix = RequestPrefix.API)
@Tag(name = "房间信息-API")
public class RoomDataApiController extends Controller implements DataApi {

    @Autowired
    private RoomService roomService;

    @PubAction(value = "/info", method = RequestMethod.POST)
    public RoomDto selectById(String id) {
        return roomService.selectById(id);
    }
    @PubAction(value = "/testWrap", method = RequestMethod.POST)
    public List<RoomDto> testWrap(String id) {
        return roomService.testWrap(id);
    }

    @PubAction(value = "/testMapperXml", method = RequestMethod.POST)
    public List<RoomDto> testMapperXml(String id) {
        return roomService.testMapperXml(id);
    }

}
